package cn.stylefeng.guns.modular.gridsystem.model.param;

import cn.stylefeng.guns.core.pojo.base.param.BaseParam;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
public class GatewayFlowParam extends BaseParam {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {edit.class})
    private Long id;

    /**
     * 网关主键
     */
    private Integer gatewayId;

    /**
     * 网关编码
     */
    @NotBlank(message = "网关编码不能为空", groups = {add.class, edit.class})
    @Size(max = 100, message = "网关编码不能超过最大长度100", groups = {add.class, edit.class})
    private String gatewayCode;

    /**
     * 上报时间
     */
    private Date reportTime;

    /**
     * 流量大小（单位：bit）
     */
    @NotNull(message = "流量大小不能为空", groups = {add.class, edit.class})
    private Float flow;

}
